package com.dc.adaptor.transport.ws.app;

import com.dc.adaptor.persistance.bean.SipSendPack;
import com.dc.adaptor.transport.TransportMeta;
import com.dc.adaptor.transport.TransportSender;
import com.dc.trans.steps.wstcissout.wsclient.TcissInterfaceStub;

/**
* @ClassName: WsTcissSender
* @Description: TODO
* @author zhangbinp
* @date Aug 23, 2012 4:04:33 PM
*/
public class WsTcissSender implements TransportSender {
	private WsTcissMeta meta;
	public WsTcissSender(TransportMeta meta){
		this.meta = (WsTcissMeta)meta;
	}
	@Override
	public void dispose() {
	}
	
	@Override
	public Object send(SipSendPack pack) throws Exception {
		TcissInterfaceStub stub = new TcissInterfaceStub(meta.getIp());
		TcissInterfaceStub.TcissSave tcissSave = new TcissInterfaceStub.TcissSave();
		
		tcissSave.setIn0(pack.getSipContent().getContent());
		return stub.tcissSave(tcissSave).getOut();
	}

}
